using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.BizTalk.Tracking;
using System.Windows.Forms;
using Bizspoke.BizTalk.Adapter;
using System.Collections;
using System.Data;

namespace Bizspoke.BizTalk.HATPlugIn
{
    //[HatOperationsViewPlugin]
    public class OperationsMenu : IMainMenuPlugin, IOverrideDbLocation, INavigateNewWindowRequesting
    {
        private static readonly string name = "Bizspoke Plugin (Operations)";

        #region INavigateNewWindowRequesting Members

        public event NavigateNewWindowRequestEvent NavigateNewWindowRequest;

        #endregion

        #region IMainMenuPlugin Members

        public void OnClick()
        {
            if (this.NavigateNewWindowRequest != null)
            {
                MessageBox.Show(name + " clicked");
            }
        }

        public string UiName
        {
            get { return name; }
        }

        #region IOverrideDbLocation Members

        public void SetMgmtDB(string mgmtDbName, string mgmtDbServerName)
        {
            Info.BtsMgmtDBName = mgmtDbName;
            Info.BtsMgmtDBServer = mgmtDbServerName;
        }

        public void SetTrackingDB(string archiveDbName, string archiveDbServerName)
        {
            Info.BtsTrackingDBName = archiveDbName;
            Info.BtsTrackingDBServer = archiveDbServerName;
        }

        #endregion

        #endregion
    }
}
